package com.itheima.reggie.mapper;

import com.itheima.reggie.dto.DishDto;
import com.itheima.reggie.entity.DishFlavor;
import org.apache.ibatis.annotations.*;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface DishFlavorMapper {
    void saveWithFlavors(@Param("dishFlavors") List<DishFlavor> dishFlavors);
    @Select("select *from dish_flavor where dish_id=#{id};")
    List<DishFlavor> selectById(Long id);
    @Delete("delete from dish_flavor where dish_id=#{id};")
    void deleteWithFlavor(Long id);

    void deleteByIds(@Param("ids") List<Long> ids);
}
